package com.example.demo.zabbix.request.builder.trigger;

import com.example.demo.zabbix.request.BaseRequest;
import com.example.demo.zabbix.request.builder.request.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/triggerprototype/update
 */
public class TriggerPrototypeUpdateRequestBuilder extends UpdateRequestBuilder {
    private String triggerId;
    public TriggerPrototypeUpdateRequestBuilder(String auth) {
        super("triggerprototype.update", auth);
    }

    public TriggerPrototypeUpdateRequestBuilder(Long id, String auth) {
        super("triggerprototype.update", id, auth);
    }

    public String getTriggerId() {
        return triggerId;
    }

    public TriggerPrototypeUpdateRequestBuilder setTriggerId(String triggerId) {
        this.triggerId = triggerId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("triggerid",triggerId);
        return baseRequest;
    }
}
